Optimal. Leaf size=51 \[ \frac{a^2 \sin (c+d x)}{3 d}-\frac{2 i \cos ^3(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0419488, antiderivative size = 51, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {3496, 2637} \[ \frac{a^2 \sin (c+d x)}{3 d}-\frac{2 i \cos ^3(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3496
Rule 2637
Rubi steps
\begin{align*} \int \cos ^3(c+d x) (a+i a \tan (c+d x))^2 \, dx &=-\frac{2 i \cos ^3(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{3 d}+\frac{1}{3} a^2 \int \cos (c+d x) \, dx\\ &=\frac{a^2 \sin (c+d x)}{3 d}-\frac{2 i \cos ^3(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{3 d}\\ \end{align*}
Mathematica [A] time = 0.178426, size = 50, normalized size = 0.98 \[ \frac{a^2 (2 \cos (c+d x)-i \sin (c+d x)) (\sin (2 (c+d x))-i \cos (2 (c+d x)))}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.052, size = 54, normalized size = 1.1 \begin{align*}{\frac{1}{d} \left ( -{\frac{{a}^{2} \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{3}}-{\frac{2\,i}{3}}{a}^{2} \left ( \cos \left ( dx+c \right ) \right ) ^{3}+{\frac{{a}^{2} \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{3}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.06649, size = 70, normalized size = 1.37 \begin{align*} -\frac{2 i \, a^{2} \cos \left (d x + c\right )^{3} + a^{2} \sin \left (d x + c\right )^{3} +{\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{2}}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.19644, size = 84, normalized size = 1.65 \begin{align*} \frac{-i \, a^{2} e^{\left (3 i \, d x + 3 i \, c\right )} - 3 i \, a^{2} e^{\left (i \, d x + i \, c\right )}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.43183, size = 76, normalized size = 1.49 \begin{align*} \begin{cases} \frac{- 2 i a^{2} d e^{3 i c} e^{3 i d x} - 6 i a^{2} d e^{i c} e^{i d x}}{12 d^{2}} & \text{for}\: 12 d^{2} \neq 0 \\x \left (\frac{a^{2} e^{3 i c}}{2} + \frac{a^{2} e^{i c}}{2}\right ) & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.25377, size = 717, normalized size = 14.06 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]